Skip to content

查询与用户授权记录(openid)

通过openid查询用户授权信息

请求参数类型描述
openidstring用户标识
queryobject声明请求的查询参数
service_idstring服务ID
appidstring公众号id
php
$instance->v3->payscore->permissions->openid->_openid_->getAsync([
  'openid' => 'oUpF8uMuAJO_M2pxb1Q9zNjWeS6o',
  'query' => [
    'service_id' => '2002000000000558128851361561536',
    'appid' => 'wxd678efh567hg6787',
  ],
])
->then(static function(\Psr\Http\Message\ResponseInterface $response) {
  print_r(json_decode((string) $response->getBody(), true));
})
->wait();
php
$instance->chain('v3/payscore/permissions/openid/{openid}')->getAsync([
  'openid' => 'oUpF8uMuAJO_M2pxb1Q9zNjWeS6o',
  'query' => [
    'service_id' => '2002000000000558128851361561536',
    'appid' => 'wxd678efh567hg6787',
  ],
])
->then(static function(\Psr\Http\Message\ResponseInterface $response) {
  print_r(json_decode((string) $response->getBody(), true));
})
->wait();
php
$instance['v3/payscore/permissions/openid/{openid}']->getAsync([
  'openid' => 'oUpF8uMuAJO_M2pxb1Q9zNjWeS6o',
  'query' => [
    'service_id' => '2002000000000558128851361561536',
    'appid' => 'wxd678efh567hg6787',
  ],
])
->then(static function(\Psr\Http\Message\ResponseInterface $response) {
  print_r(json_decode((string) $response->getBody(), true));
})
->wait();
php
$response = $instance->v3->payscore->permissions->openid->_openid_->get([
  'openid' => 'oUpF8uMuAJO_M2pxb1Q9zNjWeS6o',
  'query' => [
    'service_id' => '2002000000000558128851361561536',
    'appid' => 'wxd678efh567hg6787',
  ],
]);
print_r(json_decode((string) $response->getBody(), true));
php
$response = $instance->chain('v3/payscore/permissions/openid/{openid}')->get([
  'openid' => 'oUpF8uMuAJO_M2pxb1Q9zNjWeS6o',
  'query' => [
    'service_id' => '2002000000000558128851361561536',
    'appid' => 'wxd678efh567hg6787',
  ],
]);
print_r(json_decode((string) $response->getBody(), true));
php
$response = $instance['v3/payscore/permissions/openid/{openid}']->get([
  'openid' => 'oUpF8uMuAJO_M2pxb1Q9zNjWeS6o',
  'query' => [
    'service_id' => '2002000000000558128851361561536',
    'appid' => 'wxd678efh567hg6787',
  ],
]);
print_r(json_decode((string) $response->getBody(), true));
返回字典类型描述
service_idstring服务id
appidstring公众号id
mchidstring商户号
openidstring用户标识
authorization_codestring授权协议号
cancel_authorization_timestring最近一次解除授权时间
authorization_success_timestring最近一次授权成功时间
user_risk_levelnumber用户分层
risk_level_versionnumber分层版本

参阅 官方文档 官方文档

Published on the GitHub by TheNorthMemory